#ifndef ELEMENTENEMY_H
#define ELEMENTENEMY_H

#include "GameElement.h"
#include "Drawing.h"
#include "AnimationObj.h"


class ElementEnemy:virtual public GameElement
{
    vector3<float> deltaPos;
    vector3<float> oldPos;
    AABB detectArea;
    int speed, detectWidth, detectDepth;
    void recalcDetectArea()
    {
        detectArea=geometry;
        detectArea.add(vector3<float>(detectWidth,0,detectDepth));
    }

public:
    ElementEnemy(vector3<int> pos);
    void invokeCollisionEvent(Character*);
    void invokeActivateEvent();
    void invokeUpdateEvent(Character *);
    void activate();
    void deactivate();
    void render();
    void editorModeRender();
    void update();
    const char* getName(){return "Enemy";}

    void setSpeed(int s){speed=s;}
    int getSpeed(){return speed;}
    void setDetectionWidth(int _width);
    void setDetectionDepth(int _depth);
    int getDetectionWidth(){return detectWidth;}
    int getDetectionDepth(){return detectDepth;}
    void resetPostion();
};

#endif // ELEMENTENEMY_H
